import request from '../../utils/request';

export async function getApi(payload) {
    const url ='http://localhost:3001/agents?' + (payload ? `${payload.type}` : '');
    return request(url);
}

export async function changeItemApi(payload) {
    return request(`http://localhost:3001/agents/${payload.id}`, {
        method: 'PUT',
        body: payload.body
    });
}


